package com.zim.ta_service.base.redis;

/**
 * 描述:
 *
 * @Author: ZimH
 * @Mobile: 182-5958-1506
 * @CreateDate: 2023/1/9 19:44
 * @Version: 1.0
 */

public class DataRedisKey {

	/**
	 * 缓存前缀
	 */
	public static final String CACHE_SUFFIX = "data:";

	/**
	 * 推送有效数据缓存(data:push:deviceId)
	 */
	public static final String PUSH = CACHE_SUFFIX + "push:%s";

	/**
	 * 推送数据缓存(data:absPush:deviceId)
	 */
	public static final String ABSPUSH = CACHE_SUFFIX + "absPush:%s";


	/**
	 * 生成推送有效数据缓存Key
	 */
	public static String generatePushKey(String deviceId) {
		return String.format(PUSH, deviceId.trim());
	}

	/**
	 * 生成推送数据缓存Key
	 */
	public static String generateAbsPushKey(String deviceId) {
		return String.format(ABSPUSH, deviceId.trim());
	}

}
